<?php
$cart = __template_get('cart');
?>
<table>
	<thead>
		<tr>
			<th><?= __('cart','validation_tab_product_title')?></th>
			<th><?= __('cart','validation_tab_unit_price_title')?></th>
			<th><?= __('cart','validation_tab_quantity_title')?></th>
			<th><?= __('cart','validation_tab_total_price_title')?></th>
			<th><?= __('cart','validation_tab_actions_title')?></th>
		</tr>
	</thead>
	<tbody>
	<? foreach($cart['list'] as $id=>$productItem){ 
		if(isset($productItem['product'])){
			$product = unserialize($productItem['product']);
	?>
	<tr>
		<td>
			<?= Html::image(__imageSizer("webapp/public/media/".$product->image,"micro"),
						"",
						Html::db($product->name),
						"fleft") ?>
			<p class="ProductTitle"><?= Html::db($product->name)?></p>
		</td>
		<td>
			<?= Html::currency($product->price) ?>
		</td>
		<td>
			<?= Html::db($productItem['qty'])?>
		</td>
		<td>
			<?= Html::currency($product->price * $productItem['qty'])?>
		</td>
		<td><?= HtmlHelpers::ajaxDeleteButton(
						"cart",
						"delete",
						"product",
						$product->product_id,
						__s('cart','delButton_title',$product->name),
						array('ajaxTarget'=>"cartlist"))?>
			<p class="spacer"></p>
		</td>
	</tr>
<? 		}
	}
?>
	</tbody>
	<tfoot>
		<tr>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
			<td></td>
		</tr>
	</tfoot>
</table>